﻿namespace Liger.Web.UI
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Liger.Web.Common;
    using Liger.Web.Common.Extensions;
    using System.ComponentModel;
    using Liger.Web.Javascript;


    public class FormField : JObjectBase
    {
        public FormField()
            : this(null)
        {
        }
        public FormField(string name)
            : base()
        {
            this.Name = name;
        }
        /// <summary>
        /// 绑定列名
        /// </summary>
        public string Name
        {
            get;
            set;
        } 
        /// <summary>
        /// 字段类型
        /// </summary>
        public string Type
        {
            get;
            set;
        }

        /// <summary>
        /// 是否新行
        /// </summary>
        public bool? Newline
        {
            get;
            set;
        }

        /// <summary>
        /// 是否分组
        /// </summary>
        public bool? Group
        {
            get;
            set;
        }
        /// <summary>
        ///  分组图标(路径)
        /// </summary>
        public string Groupicon
        {
            get;
            set;
        }

        /// <summary>
        /// 设置Label
        /// </summary>
        public string Label
        {
            get;
            set;
        }

        /// <summary>
        /// 设置Label Width
        /// </summary>
        public int? LabelWidth
        {
            get;
            set;
        }
         

        /// <summary>
        /// 设置Label对齐方式
        /// </summary>
        public string LabelAlign
        {
            get;
            set;
        }
        /// <summary>
        /// 设置对齐方式
        /// </summary>
        public string Align
        {
            get;
            set;
        }

        /// <summary>
        /// 设置间隔部分
        /// </summary>
        public int? Space
        {
            get;
            set;
        }

        /// <summary>
        /// 设置 下拉框的文本表单名
        /// </summary>
        public string ComboboxName
        {
            get;
            set;
        }

        /// <summary>
        /// 设置 其他属性
        /// </summary>
        public Dictionary<string,string> Attr
        {
            get;
            set;
        }
        /// <summary>
        /// 验证信息
        /// </summary>
        public Dictionary<string,string> Validate
        {
            get;
            set;
        }
    }

}
